/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package authentication;

/**
 *
 * @author USER
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) throws Exception {

        // simple tests
        AuthenticationInterface ua = new UserAuthentication("users_file.txt");
        System.out.println(ua.addUser("ufnik", "kipi", "ufnik"));
        System.out.println(ua.addUser("moishe", "kipi", "moishe"));
        System.out.println(ua.addUser("giladc", "289175", "MEMBER"));
        System.out.println(ua.addUser("giladq", "12345", "ADMIN"));
        System.out.println(ua.checkUser("moishe", "kipi"));
        System.out.println(ua.checkUser("ufnik", "kipi"));
        System.out.println(ua.checkUser("gilacdq", "12345"));
        System.out.println(ua.checkUser("giladsc", "289175"));
        System.out.println(ua.getUserPermission("giladc"));
        System.out.println(ua.getUserPermission("giladq"));
    }
}
